package cn.lanqiao.ui;


import java.awt.EventQueue;
import java.awt.Font;

import javax.swing.JInternalFrame;
import javax.swing.JLabel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;


public class FamousTeaFrm extends JInternalFrame {

	private static final long serialVersionUID = 1L;
	private JTable table;

	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					FamousTeaFrm frame = new FamousTeaFrm();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	public FamousTeaFrm() {
		
		setTitle("教学名师");
		setClosable(true);
		setBounds(100, 100, 510, 400);
		getContentPane().setLayout(null);
		
		JScrollPane scrollPane = new JScrollPane();
		scrollPane.setBounds(0, 13, 494, 265);
		getContentPane().add(scrollPane);
		
		table = new JTable();
		cn.lanqiao.service.TeacherService service = new cn.lanqiao.service.impl.TeacherServiceImpl();
		Object[][] datas = service.getTeacher();
		String[] strs = new String[] {"工号", "教师姓名"};
		table.setModel(new DefaultTableModel( datas , strs ) );
		table.setBounds(0, 0, 1, 1);
		scrollPane.setViewportView(table);
		
		JLabel lblTeam = new JLabel("专业团队，等待你的加入！");
		lblTeam.setFont(new Font("微软雅黑", Font.PLAIN, 20));
		lblTeam.setBounds(240, 286, 240, 60);
		getContentPane().add(lblTeam);
		
		setLocation(500, 260);
	}
}
